package com.wc.alorithm_luogu.P1319;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/22 12:29
 * @description https://www.luogu.com.cn/problem/P1319
 * 压缩技术
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        StringBuilder ans = new StringBuilder();
        char one = '1';
        char zero = '0';
        int oneOfNum;
        int zeroOfNum;
        int count = 0;
        while (count < n * n) {
            zeroOfNum = sc.nextInt();
            while (zeroOfNum-- > 0) {
                ans.append(zero);
                count++;
                if (count % n == 0) {
                    ans.append('\n');
                }
            }
            if (count == n * n) {
                break;
            }
            oneOfNum = sc.nextInt();
            while (oneOfNum-- > 0) {
                ans.append(one);
                count++;
                if (count % n == 0) {
                    ans.append('\n');
                }
            }
        }

        System.out.print(ans);
    }
}
